﻿@model KCMS.BusinessLogic.Models.ProductImage
@using KCMS.Helpers
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <legend>ProductImage</legend>

    @Html.HiddenFor(model => model.Id)
     <div class="editor-label">
        @Html.LabelFor(model => model.Color)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Color)
        @Html.ValidationMessageFor(model => model.Color)
    </div>
       <div class="editor-label">
        @Html.LabelFor(model => model.ImageFile)
    </div>
    <div class="editor-field">
        @if (Model.ImageFile != null)
        {
            <img src="@Url.ContentImageUpload(@Model.ImageFile)" style="width:400px;"/>
        }
        <input type="file" id="image" name="image" />
    </div>

    <div class="editor-label">
        @Html.Label("ThumbImageFile")
    </div>
    <div class="editor-field">
        @if (Model.ColorImageFile != null)
        {
            <img src="@Url.ContentImageUpload(@Model.ColorImageFile)"/>
        }
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.DateOfCreate)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.DateOfCreate)
        @Html.ValidationMessageFor(model => model.DateOfCreate)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.DateOfChange)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.DateOfChange)
        @Html.ValidationMessageFor(model => model.DateOfChange)
    </div>
    @Html.HiddenFor(model => model.ImageFile)
    @Html.HiddenFor(model => model.ColorImageFile)
}
